<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="pe137116">dropuser</title><body><p id="client_util_desc">Removes a database role.</p><section id="section2"><title>Synopsis</title><codeblock id="client_util_synopsis">dropuser [&lt;connection-option> ...] [-e] [-i] &lt;role_name>

dropuser -? | --help 

dropuser -V | --version</codeblock></section><section id="section3"><title>Description</title><p><codeph>dropuser</codeph> removes an existing role from Greenplum Database. Only
        superusers and users with the <codeph>CREATEROLE</codeph> privilege can remove roles. To
        remove a superuser role, you must yourself be a superuser.</p><p><codeph>dropuser</codeph> is a wrapper around the SQL command <codeph>DROP
ROLE</codeph>.</p></section><section id="section4"><title>Options</title><parml><plentry><pt><varname>role_name</varname></pt><pd>The name of the role to be removed. You will be prompted for a name if not specified on the
  command line and the <codeph>-i</codeph>/<codeph>--interactive</codeph> option
  is used.</pd></plentry><plentry><pt>-e | --echo</pt><pd>Echo the commands that <codeph>dropuser</codeph> generates and sends
    to the server. </pd></plentry><plentry><pt>-i | --interactive</pt><pd>Prompt for confirmation before actually removing the role, and prompt for the role name if none
            is specified on the command line.</pd></plentry>
        <plentry>
          <pt>--if-exists</pt>
          <pd>Do not throw an error if the user does not exist. A notice is
            issued in this case.</pd>
        </plentry>
       <plentry>
          <pt>-V | --version</pt>
          <pd>Print the <codeph>dropuser</codeph> version and exit.</pd>
        </plentry>
        <plentry>
          <pt>-? | --help</pt>
          <pd>Show help about <codeph>dropuser</codeph> command line arguments, and exit.</pd>
        </plentry></parml><sectiondiv id="section5"><b>Connection Options</b><parml><plentry><pt>-h <varname>host</varname> | --host=<varname>host</varname></pt><pd>The host name of the machine on which the Greenplum master database
              server is running. If not specified, reads from the environment variable
                <codeph>PGHOST</codeph> or defaults to localhost.</pd></plentry><plentry><pt>-p <varname>port</varname> | --port=<varname>port</varname></pt><pd>The TCP port on which the Greenplum master database server is
              listening for connections. If not specified, reads from the environment variable
                <codeph>PGPORT</codeph> or defaults to 5432.</pd></plentry><plentry><pt>-U <varname>username</varname> | --username=<varname>username</varname></pt><pd>The database role name to connect as. If not specified, reads from
the environment variable <codeph>PGUSER</codeph> or defaults to the current
system role name.</pd></plentry><plentry><pt>-w | --no-password</pt><pd>Never issue a password prompt. If the server requires password authentication
and a password is not available by other means such as a <codeph>.pgpass</codeph>
file, the connection attempt will fail. This option can be useful in
batch jobs and scripts where no user is present to enter a password.</pd></plentry><plentry><pt>-W | --password</pt><pd>Force a password prompt.</pd></plentry></parml></sectiondiv></section><section id="section6"><title>Examples</title><p>To remove the role <codeph>joe</codeph> using default connection options:</p><codeblock>dropuser joe
DROP ROLE</codeblock><p>To remove the role <varname>joe</varname> using connection options, with verification,
and a peek at the underlying command:</p><codeblock>dropuser -p 54321 -h masterhost -i -e joe
Role "joe" will be permanently removed.
Are you sure? (y/n) y
DROP ROLE "joe"
DROP ROLE</codeblock></section><section id="section7">
      <title>See Also</title>
      <p><ph otherprops="op-print"><codeph>DROP ROLE</codeph> in the <i>Greenplum Database Reference
            Guide</i></ph><ph><xref href="createuser.xml#topic1"/>, <xref
            href="../../ref_guide/sql_commands/DROP_ROLE.xml#topic1"/></ph></p>
    </section></body></topic>
